package server

import (
	"fmt"
	"net"
	"net/rpc"
)

type Listerner int

func (l *Listerner) GetLine(lint []byte, ack *bool) error {

	fmt.Println("server:" + string(lint))
	return nil
}
func TestRpcSerer() {
	addr, err := net.ResolveTCPAddr("tcp", ":8888")
	if err != nil {
		panic(err)
	}

	tcp, err := net.ListenTCP("tcp", addr)
	if err != nil {
		panic(err)
	}

	listener := new(Listerner)

	rpc.Register(listener)
	rpc.Accept(tcp)
}
